package com.matrix.java.chap_06;

import java.util.Scanner;

public class Ex6_06 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.print("行数: ");
        int n = input.nextInt();
        input.close();
        displayPattern(n);
    }

    private static void displayPattern(int n) {
        for (int i = 1; i <= n; i++) {
            for (int j = 0; j <n-i; j++) {
                System.out.print("  ");
            }
            for (int j = i; j >1 ; j--) {
                System.out.print(j+" ");
            }
            System.out.println(1);
        }
    }
}
